package cn.stronglink.asset.module.assetmanage.itasset.mapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;

import cn.stronglink.asset.model.AssetExtMaintenance;
import cn.stronglink.asset.model.AssetExtUsing;
import cn.stronglink.asset.model.AssetTypeAttr;
import cn.stronglink.asset.model.AssetTypeValue;
import cn.stronglink.asset.model.Department;
import cn.stronglink.asset.model.ItAsset;
import cn.stronglink.asset.model.ItAssetExtPosition;
import cn.stronglink.asset.model.RfidState;
import cn.stronglink.asset.model.TRoom;
import cn.stronglink.asset.model.User;
import cn.stronglink.asset.module.assetmanage.itasset.vo.AssetExlVo;
import cn.stronglink.asset.module.assetmanage.itasset.vo.AssetParamVo;
import cn.stronglink.asset.module.assetmanage.itasset.vo.ItAssetVo;
import cn.stronglink.asset.module.report.vo.ExlChartVo;
import cn.stronglink.asset.module.report.vo.ReportParams;

public interface ItassetMapper {
	
	public List<ItAsset> queryList(Pagination page,@Param("params")Map<String, Object> params);
	
	public void removeItAsset(@Param("id")Long id);

	public void insertItAsset(ItAsset asset);

	public void updateItAsset(ItAsset asset);

	public ItAsset qryById(@Param("id") Long id);

	public List<ItAsset> queryRackList(@Param("roomId") Long roomId);

	public Integer qryByRfidNo(@Param("params")  Map<String, Object> map);

	public List<ItAssetVo> querAssetListByParam(Pagination page,@Param("params") Map<String, Object> params);
	public List<ItAssetVo> qryAssetByParamInstock(Pagination page,@Param("params") Map<String, Object> params);

	public List<ItAssetVo> qryItAssetVo(@Param("applyDetailId") Long applyDetailId);

	public List<ItAssetVo> qryPutOnDetailVo(@Param("id") Long id);

	public List<ItAssetVo> qryScrapDetailVo(@Param("id") Long id);

	public List<ItAssetVo> queryAssetList(Page<ItAssetVo> page, @Param("params") Map<String, Object> params);

	public ItAssetVo qryAssetById(@Param("assetId") Long assetId);

	public ItAssetVo qryAssetAllAttrById(@Param("assetId") Long assetId);

	public void updateItAssetById(ItAsset asset);
	public Integer qryByAssetNo(Map<String, Object> assetNoMap);
	public Integer existsSerialNo(@Param("params") Map<String, Object> params);

	public int qryRackCount();

	public int qryUcount();

	public int qryAssetCount();

	public List<HashMap<String,Object>> qryAssetCountByRoom(@Param("roomId") Long roomId);

	public List<HashMap<String,Object>> qryAssetPerGroupByRoom();

	public List<HashMap<String,Object>> qryUPerGroupByRoom();

	public List<HashMap<String,Object>> qryURackList(@Param("roomId") Long roomId);

	public int qryisUsedUByRackId(@Param("rackId") Long rackId);

	public List<Map<String, Object>> getRacksByRoomName(@Param("roomId") Long roomId);

	public List<Map<String, Object>> getServersByRoomName(@Param("roomId") Long roomId);

	public Map<String, Object> getRackInfo(@Param("rackCode") String rackCode);

	public Map<String, Object> getServerInfo(@Param("serverCode") String serverCode);

	public int getUheight(@Param("modelId") Long modelId);

	public List<ItAsset> queryRackListByUserId(@Param("roomId") Long roomId);

	public Integer qryAssetByRfidNo(@Param("params") Map<String, Object> map);

	public Long delAsset(int cmdbId);

	public Long getRackIdByName(@Param("rackName") String rackName);

	public List<String> getOtherAssetInRack(Map<String, Object> parmsMap);

	public ItAssetVo getLedgerU(@Param("rfid") String rfid);

	public ItAssetVo getRoomIdByRackConverCode(@Param("rackCode") String rackCode);

	public RfidState getRoomAndRack(@Param("rackConverCode") String rackConverCode);

	public List<Map<String, Object>> queryRackFor3DTest();

	public ItAsset qryRackNameById(@Param("rackId") String rackId);

	public String getRacksNameByDevAddrCode(@Param("devAddrCode") String devAddrCode);

	public List<Map<String, Object>> queryFor3DTest();

	public String getRackConverCode(@Param("rackName") String rackName);

	public void updateAssetIsLight(ItAsset asset);

	public Integer qryBy24G(Map<String, Object> map);

	public Map<String,Object> qryAssetLable(@Param("assetLable") String assetLable);

	public List<Map<String, Object>> getServerListByRackId(@Param("rackId") Long rackId);

	public HashMap<String, Object> qryOtherCount();

	public String getRack24g(@Param("rack24g") String rack24g);

	public int qryIsLightCount(@Param("assetLable") String assetLable);

	public List<RfidState> getServerByRackId(@Param("rackId") Long rackId);

	public List<ItAssetVo> getAssetListByRackId(@Param("rackId") Long id);

	public List<ItAssetVo> exportAssetExcel(@Param("params") Map<String, Object> params);

	public List<ItAssetVo> getAssetBySN(@Param("snCode") String snCode);
	
	public List<ItAssetVo> getAssetByRfid(@Param("rfidCode") String rfidCode);

	public List<ItAssetVo> getBindAsset();

	
	public List<ItAssetVo> queryAssetListNoPage(@Param("params") Map<String, Object> params);

	public List<AssetExlVo> queryAttrVlaueByTypeIdAndAssetId(@Param("typeId") Long typeId,@Param("assetId") Long assetId);

	public int bindRfid(@Param("assetId") String assetId, @Param("rfid")String rfid);
	
	public List<ItAssetVo> getAllRacks();

	public List<AssetTypeAttr> queryAttrByTypeId(@Param("typeId") String typeId);

	public String queryTypeNameByTypeId(@Param("typeId") String typeId);

	public List<String> queryAllAssetNoList();

	public List<String> queryAllAssetRFIDList();

	public List<TRoom> queryRoomList();

	public List<ItAsset> queryAllRackList();

	public List<Department> queryAllDepartmentList();

	public List<User> queryAllUserList();

	public int batchInsertAsset(@Param("interimList") List<ItAssetVo> interimList);

	public int batchInsertExtPositon(@Param("interimList") List<ItAssetExtPosition> interimList);

	public int batchInsertExtUsing(@Param("interimList") List<AssetExtUsing> interimList);

	public int batchInsertExtMaintenance(@Param("interimList") List<AssetExtMaintenance> interimList);

	public int batchInsertAttrValue(@Param("interimList") List<AssetTypeValue> interimList);

	public void batchUpdateExtUsing(ItAssetVo asset);
	
	public List<ItAssetVo> getAssetByAssetCode(@Param("assetCode") String assetCode);

	public ItAssetVo qryAssetDetailById(@Param("assetId") Long assetId);

	public void updateIsLight(@Param("assetId") Long assetId, @Param("light") int light);

	public void updateLightBatch(HashMap<String, Object> map);
	public List<ItAssetVo> queryAssetListForReport(ReportParams params);

	public List<ExlChartVo> qryChartDataForAssetTypeId(ReportParams params);

	public List<ExlChartVo> qryChartDataForAssetBrandId(ReportParams params);

	public List<ExlChartVo> qryChartDataForAssetModelId(ReportParams params);

	public List<ExlChartVo> qryChartDataForAssetRoomId(ReportParams params);

	public List<ExlChartVo> qryChartDataForAssetBuyTime(ReportParams params);

	public List<ExlChartVo> qryChartDataForAssetExpirationTime(ReportParams params);

	public List<ExlChartVo> qryChartDataForAssetManageBranch(ReportParams params);

	public List<ExlChartVo> qryChartDataForAssetUserBranch(ReportParams params);

	public AssetParamVo getInventoryU(@Param("rfidNo") String rfidNo);

	public int qryCountByRfidNo(@Param("rfidNo") String rfidNo);

	public List<RfidState> getServerUfromAboveDown(@Param("rackId")Long rackId);

	
}
